package symbol;

import java.util.List;

public class FuncSymbol extends Symbol {
    private final int paramNum; // 参数个数
    private final List<Symbol> paramList; // 参数类型列表

    public FuncSymbol(String name, SymbolType type, int paramNum, int scopeLevel, int scopeNumber,
            List<Symbol> paramList) {
        super(name, type, scopeLevel, scopeNumber);
        this.paramNum = paramNum;
        this.paramList = paramList;
    }

    public int getParamNum() {
        return paramNum;
    }

    public List<Symbol> getParamList() {
        return paramList;
    }

    public String getTypeName() {
        if (getType() == SymbolType.INT) {
            return "IntFunc";
        } else if (getType() == SymbolType.CHAR) {
            return "CharFunc";
        } else {
            return "VoidFunc";
        }
    }
}
